package controllers

import (
	"github.com/astaxie/beego"
	"home/models"
)

type CateController struct {
	beego.Controller
}

func (this *CateController) Get() {
	this.TplName="cate.tpl"
	// 获取菜单数据
	var datalist []models.HomeMenu
	datalist, err := models.GetMenu()
	if err != nil {
		beego.Error(err)
	}
	this.Data["Menu"] = datalist

		// 获取热门影片
	var popularWithData []models.PopularWith
	popularWithData, err = models.GetPopularWith()
	if err != nil {
		beego.Error(err)
	}
	this.Data["PopularWithData"] = popularWithData
}
